package com.hui.admin.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * 城市拼音转中文名称工具类
 */
public class CityPinyinToChineseUtil {

    // 城市 -> 区/市 -> 拼音 -> 中文名称
    private static final Map<String, Map<String, String>> cityAreaMap = new HashMap<>();

    static {
        // 初始化北京市
        Map<String, String> beijingAreas = new HashMap<>();
        beijingAreas.put("dongcheng", "东城区");
        beijingAreas.put("xicheng", "西城区");
        beijingAreas.put("chaoyang", "朝阳区");
        beijingAreas.put("haidian", "海淀区");
        beijingAreas.put("fengtai", "丰台区");
        beijingAreas.put("shijingshan", "石景山区");
        beijingAreas.put("tongzhou", "通州区");
        beijingAreas.put("shunyi", "顺义区");
        beijingAreas.put("changping", "昌平区");
        beijingAreas.put("daxing", "大兴区");
        beijingAreas.put("fangshan", "房山区");
        beijingAreas.put("mentougou", "门头沟区");
        beijingAreas.put("yanqing", "延庆区");
        beijingAreas.put("huairou", "怀柔区");
        beijingAreas.put("pinggu", "平谷区");
        beijingAreas.put("miyun", "密云区");
        cityAreaMap.put("beijing", beijingAreas);

        // 上海市
        Map<String, String> shanghaiAreas = new HashMap<>();
        shanghaiAreas.put("changping", "昌平区");
        shanghaiAreas.put("chaoyang", "朝阳区");
        shanghaiAreas.put("daxing", "大兴区");
        shanghaiAreas.put("dongcheng", "东城区");
        shanghaiAreas.put("fangshan", "房山区");
        shanghaiAreas.put("fengtai", "丰台区");
        shanghaiAreas.put("haidian", "海淀区");
        shanghaiAreas.put("huairou", "怀柔区");
        shanghaiAreas.put("mentou", "门头沟");
        shanghaiAreas.put("miyun", "密云区");
        shanghaiAreas.put("pinggu", "平谷区");
        shanghaiAreas.put("shijingshan", "石景山区");
        shanghaiAreas.put("shunyi", "顺义区");
        shanghaiAreas.put("tongzhou", "通州区");
        shanghaiAreas.put("xicheng", "西城区");
        shanghaiAreas.put("yanqing", "延庆区");
        cityAreaMap.put("shanghai", shanghaiAreas);

        // 天津市
        Map<String, String> tianjinAreas = new HashMap<>();
        tianjinAreas.put("heping", "和平区");
        tianjinAreas.put("hedong", "河东区");
        tianjinAreas.put("hexi", "河西区");
        tianjinAreas.put("nankai", "南开区");
        tianjinAreas.put("hebei", "河北区");
        tianjinAreas.put("hongqiao", "红桥区");
        tianjinAreas.put("binhaixinqu", "滨海新区");
        tianjinAreas.put("dongli", "东丽区");
        tianjinAreas.put("xiqing", "西青区");
        tianjinAreas.put("jinnan", "津南区");
        tianjinAreas.put("beichen", "北辰区");
        tianjinAreas.put("wuqing", "武清区");
        tianjinAreas.put("baodi", "宝坻区");
        tianjinAreas.put("jizhou", "蓟州区");
        tianjinAreas.put("jinghai", "静海区");
        tianjinAreas.put("ninghe", "宁河区");
        cityAreaMap.put("tianjin", tianjinAreas);

        // 重庆市
        Map<String, String> chongqingAreas = new HashMap<>();
        chongqingAreas.put("yuzhong", "渝中区");
        chongqingAreas.put("jiangbei", "江北区");
        chongqingAreas.put("nanan", "南岸区");
        chongqingAreas.put("jiulongpo", "九龙坡区");
        chongqingAreas.put("shapingba", "沙坪坝区");
        chongqingAreas.put("dadukou", "大渡口区");
        chongqingAreas.put("beibei", "北碚区");
        chongqingAreas.put("yubei", "渝北区");
        chongqingAreas.put("banan", "巴南区");
        chongqingAreas.put("wanzhou", "万州区");
        chongqingAreas.put("fuling", "涪陵区");
        chongqingAreas.put("qianjiang", "黔江区");
        chongqingAreas.put("changshou", "长寿区");
        chongqingAreas.put("jiangjin", "江津区");
        chongqingAreas.put("hechuan", "合川区");
        chongqingAreas.put("yongchuan", "永川区");
        chongqingAreas.put("nanchuan", "南川区");
        chongqingAreas.put("qijiang", "綦江区");
        chongqingAreas.put("dazu", "大足区");
        chongqingAreas.put("bishan", "璧山区");
        chongqingAreas.put("tongliang", "铜梁区");
        chongqingAreas.put("tongnan", "潼南区");
        chongqingAreas.put("rongchang", "荣昌区");
        chongqingAreas.put("kaizhou", "开州区");
        chongqingAreas.put("liangping", "梁平区");
        chongqingAreas.put("wulong", "武隆区");
        chongqingAreas.put("chengkou", "城口县");
        chongqingAreas.put("fengdu", "丰都县");
        chongqingAreas.put("dianjiang", "垫江县");
        chongqingAreas.put("zhongxian", "忠县");
        chongqingAreas.put("yunyang", "云阳县");
        chongqingAreas.put("fengjie", "奉节县");
        chongqingAreas.put("wushan", "巫山县");
        chongqingAreas.put("wuxi", "巫溪县");
        chongqingAreas.put("shizhu", "石柱土家族自治县");
        chongqingAreas.put("xiushan", "秀山土家族苗族自治县");
        chongqingAreas.put("youyang", "酉阳土家族苗族自治县");
        chongqingAreas.put("pengshui", "彭水苗族土家族自治县");
        cityAreaMap.put("chongqing", chongqingAreas);

        // 河北省
        Map<String, String> hebeiAreas = new HashMap<>();
        hebeiAreas.put("shijiazhuang", "石家庄市");
        hebeiAreas.put("tangshan", "唐山市");
        hebeiAreas.put("handan", "邯郸市");
        hebeiAreas.put("xingtai", "邢台市");
        hebeiAreas.put("baoding", "保定市");
        hebeiAreas.put("zhangjiakou", "张家口市");
        hebeiAreas.put("chengde", "承德市");
        hebeiAreas.put("langfang", "廊坊市");
        hebeiAreas.put("cangzhou", "沧州市");
        hebeiAreas.put("hengshui", "衡水市");
        hebeiAreas.put("qinhuangdao", "秦皇岛市");
        cityAreaMap.put("hebei", hebeiAreas);

        // 山西省
        Map<String, String> shanxiAreas = new HashMap<>();
        shanxiAreas.put("taiyuan", "太原市");
        shanxiAreas.put("datong", "大同市");
        shanxiAreas.put("yangquan", "阳泉市");
        shanxiAreas.put("changzhi", "长治市");
        shanxiAreas.put("jincheng", "晋城市");
        shanxiAreas.put("shuozhou", "朔州市");
        shanxiAreas.put("jinzhong", "晋中市");
        shanxiAreas.put("yuncheng", "运城市");
        shanxiAreas.put("xinzhou", "忻州市");
        shanxiAreas.put("linfen", "临汾市");
        shanxiAreas.put("lüliang", "吕梁市");
        cityAreaMap.put("shanxi", shanxiAreas);

        // 辽宁省
        Map<String, String> liaoningAreas = new HashMap<>();
        liaoningAreas.put("shenyang", "沈阳市");
        liaoningAreas.put("dalian", "大连市");
        liaoningAreas.put("anshan", "鞍山市");
        liaoningAreas.put("fushun", "抚顺市");
        liaoningAreas.put("benxi", "本溪市");
        liaoningAreas.put("dandong", "丹东市");
        liaoningAreas.put("jinzhou", "锦州市");
        liaoningAreas.put("yingkou", "营口市");
        liaoningAreas.put("fuxin", "阜新市");
        liaoningAreas.put("liaoyang", "辽阳市");
        liaoningAreas.put("panjin", "盘锦市");
        liaoningAreas.put("tieling", "铁岭市");
        liaoningAreas.put("chaoyang", "朝阳市");
        liaoningAreas.put("huludao", "葫芦岛市");
        cityAreaMap.put("liaoning", liaoningAreas);

        // 吉林省
        Map<String, String> jilinAreas = new HashMap<>();
        jilinAreas.put("changchun", "长春市");
        jilinAreas.put("jilin", "吉林市");
        jilinAreas.put("siping", "四平市");
        jilinAreas.put("liaoyuan", "辽源市");
        jilinAreas.put("tonghua", "通化市");
        jilinAreas.put("baishan", "白山市");
        jilinAreas.put("songyuan", "松原市");
        jilinAreas.put("baicheng", "白城市");
        jilinAreas.put("yanbian", "延边朝鲜族自治州");
        cityAreaMap.put("jilin", jilinAreas);

        // 黑龙江省
        Map<String, String> heilongjiangAreas = new HashMap<>();
        heilongjiangAreas.put("haerbin", "哈尔滨市");
        heilongjiangAreas.put("qiqihaer", "齐齐哈尔市");
        heilongjiangAreas.put("mudanjiang", "牡丹江市");
        heilongjiangAreas.put("jiamusi", "佳木斯市");
        heilongjiangAreas.put("daqing", "大庆市");
        heilongjiangAreas.put("jixi", "鸡西市");
        heilongjiangAreas.put("hegang", "鹤岗市");
        heilongjiangAreas.put("shuangyashan", "双鸭山市");
        heilongjiangAreas.put("yichun", "伊春市");
        heilongjiangAreas.put("qitaihe", "七台河市");
        heilongjiangAreas.put("heihe", "黑河市");
        heilongjiangAreas.put("suihua", "绥化市");
        heilongjiangAreas.put("daxinganling", "大兴安岭地区");
        cityAreaMap.put("heilongjiang", heilongjiangAreas);

        // 江苏省
        Map<String, String> jiangsuAreas = new HashMap<>();
        jiangsuAreas.put("nanjing", "南京市");
        jiangsuAreas.put("suzhou", "苏州市");
        jiangsuAreas.put("wuxi", "无锡市");
        jiangsuAreas.put("changzhou", "常州市");
        jiangsuAreas.put("nantong", "南通市");
        jiangsuAreas.put("lianyungang", "连云港市");
        jiangsuAreas.put("huaian", "淮安市");
        jiangsuAreas.put("yancheng", "盐城市");
        jiangsuAreas.put("yangzhou", "扬州市");
        jiangsuAreas.put("zhenjiang", "镇江市");
        jiangsuAreas.put("suqian", "宿迁市");
        jiangsuAreas.put("xuzhou", "徐州市");
        jiangsuAreas.put("taizhou", "泰州市");
        cityAreaMap.put("jiangsu", jiangsuAreas);

        // 浙江省
        Map<String, String> zhejiangAreas = new HashMap<>();
        zhejiangAreas.put("hangzhou", "杭州市");
        zhejiangAreas.put("ningbo", "宁波市");
        zhejiangAreas.put("wenzhou", "温州市");
        zhejiangAreas.put("jiaxing", "嘉兴市");
        zhejiangAreas.put("huzhou", "湖州市");
        zhejiangAreas.put("shaoxing", "绍兴市");
        zhejiangAreas.put("jinhua", "金华市");
        zhejiangAreas.put("quzhou", "衢州市");
        zhejiangAreas.put("zhoushan", "舟山市");
        zhejiangAreas.put("taizhou", "台州市");
        zhejiangAreas.put("lishui", "丽水市");
        cityAreaMap.put("zhejiang", zhejiangAreas);

        // 安徽省
        Map<String, String> anhuiAreas = new HashMap<>();
        anhuiAreas.put("hefei", "合肥市");
        anhuiAreas.put("wuhu", "芜湖市");
        anhuiAreas.put("bengbu", "蚌埠市");
        anhuiAreas.put("huainan", "淮南市");
        anhuiAreas.put("maanshan", "马鞍山市");
        anhuiAreas.put("huaibei", "淮北市");
        anhuiAreas.put("tongling", "铜陵市");
        anhuiAreas.put("anqing", "安庆市");
        anhuiAreas.put("huangshan", "黄山市");
        anhuiAreas.put("chuzhou", "滁州市");
        anhuiAreas.put("fuyang", "阜阳市");
        anhuiAreas.put("suzhou", "宿州市");
        anhuiAreas.put("liuan", "六安市");
        anhuiAreas.put("bozhou", "亳州市");
        anhuiAreas.put("chizhou", "池州市");
        anhuiAreas.put("xuancheng", "宣城市");
        cityAreaMap.put("anhui", anhuiAreas);

        // 福建省
        Map<String, String> fujianAreas = new HashMap<>();
        fujianAreas.put("fuzhou", "福州市");
        fujianAreas.put("xiamen", "厦门市");
        fujianAreas.put("quanzhou", "泉州市");
        fujianAreas.put("zhangzhou", "漳州市");
        fujianAreas.put("longyan", "龙岩市");
        fujianAreas.put("nanping", "南平市");
        fujianAreas.put("sanming", "三明市");
        fujianAreas.put("ningde", "宁德市");
        fujianAreas.put("putian", "莆田市");
        cityAreaMap.put("fujian", fujianAreas);

        // 江西省
        Map<String, String> jiangxiAreas = new HashMap<>();
        jiangxiAreas.put("nanchang", "南昌市");
        jiangxiAreas.put("jingdezhen", "景德镇市");
        jiangxiAreas.put("ganzhou", "赣州市");
        jiangxiAreas.put("jiujiang", "九江市");
        jiangxiAreas.put("shangrao", "上饶市");
        jiangxiAreas.put("fuzhou", "抚州市");
        jiangxiAreas.put("yichun", "宜春市");
        jiangxiAreas.put("jian", "吉安市");
        jiangxiAreas.put("pingxiang", "萍乡市");
        jiangxiAreas.put("xinyu", "新余市");
        jiangxiAreas.put("yingtan", "鹰潭市");
        cityAreaMap.put("jiangxi", jiangxiAreas);

        // 山东省
        Map<String, String> shandongAreas = new HashMap<>();
        shandongAreas.put("jinan", "济南市");
        shandongAreas.put("qingdao", "青岛市");
        shandongAreas.put("yantai", "烟台市");
        shandongAreas.put("zibo", "淄博市");
        shandongAreas.put("zaozhuang", "枣庄市");
        shandongAreas.put("dongying", "东营市");
        shandongAreas.put("weifang", "潍坊市");
        shandongAreas.put("jining", "济宁市");
        shandongAreas.put("taian", "泰安市");
        shandongAreas.put("weihai", "威海市");
        shandongAreas.put("rizhao", "日照市");
        shandongAreas.put("linyi", "临沂市");
        shandongAreas.put("dezhou", "德州市");
        shandongAreas.put("liaocheng", "聊城市");
        shandongAreas.put("binzhou", "滨州市");
        shandongAreas.put("heze", "菏泽市");
        shandongAreas.put("laiwu", "莱芜市");
        cityAreaMap.put("shandong", shandongAreas);

        // 河南省
        Map<String, String> henanAreas = new HashMap<>();
        henanAreas.put("zhengzhou", "郑州市");
        henanAreas.put("kaifeng", "开封市");
        henanAreas.put("luoyang", "洛阳市");
        henanAreas.put("pingdingshan", "平顶山市");
        henanAreas.put("anyang", "安阳市");
        henanAreas.put("jiyuan", "济源市");
        henanAreas.put("hebi", "鹤壁市");
        henanAreas.put("xinxiang", "新乡市");
        henanAreas.put("jiaozuo", "焦作市");
        henanAreas.put("puyang", "濮阳市");
        henanAreas.put("xuchang", "许昌市");
        henanAreas.put("luohe", "漯河市");
        henanAreas.put("sanmenxia", "三门峡市");
        henanAreas.put("shangqiu", "商丘市");
        henanAreas.put("zhoukou", "周口市");
        henanAreas.put("zhumadian", "驻马店市");
        henanAreas.put("nanyang", "南阳市");
        henanAreas.put("xinyang", "信阳市");
        cityAreaMap.put("henan", henanAreas);

        // 湖北省
        Map<String, String> hubeiAreas = new HashMap<>();
        hubeiAreas.put("wuhan", "武汉市");
        hubeiAreas.put("huangshi", "黄石市");
        hubeiAreas.put("shiyan", "十堰市");
        hubeiAreas.put("yichang", "宜昌市");
        hubeiAreas.put("xiangyang", "襄阳市");
        hubeiAreas.put("ezhou", "鄂州市");
        hubeiAreas.put("jingmen", "荆门市");
        hubeiAreas.put("xiaogan", "孝感市");
        hubeiAreas.put("jingzhou", "荆州市");
        hubeiAreas.put("huanggang", "黄冈市");
        hubeiAreas.put("xianning", "咸宁市");
        hubeiAreas.put("suizhou", "随州市");
        hubeiAreas.put("enshi", "恩施土家族苗族自治州");
        hubeiAreas.put("xiantao", "仙桃市");
        hubeiAreas.put("qianjiang", "潜江市");
        hubeiAreas.put("tianmen", "天门市");
        hubeiAreas.put("shennongjia", "神农架林区");
        cityAreaMap.put("hubei", hubeiAreas);

        // 湖南省
        Map<String, String> hunanAreas = new HashMap<>();
        hunanAreas.put("changsha", "长沙市");
        hunanAreas.put("zhuzhou", "株洲市");
        hunanAreas.put("xiangtan", "湘潭市");
        hunanAreas.put("hengyang", "衡阳市");
        hunanAreas.put("shaoyang", "邵阳市");
        hunanAreas.put("yueyang", "岳阳市");
        hunanAreas.put("changde", "常德市");
        hunanAreas.put("zhangjiajie", "张家界市");
        hunanAreas.put("yiyang", "益阳市");
        hunanAreas.put("chenzhou", "郴州市");
        hunanAreas.put("yongzhou", "永州市");
        hunanAreas.put("huaihua", "怀化市");
        hunanAreas.put("loudi", "娄底市");
        hunanAreas.put("xiangxi", "湘西土家族苗族自治州");
        cityAreaMap.put("hunan", hunanAreas);

        // 广东省
        Map<String, String> guangdongAreas = new HashMap<>();
        guangdongAreas.put("guangzhou", "广州市");
        guangdongAreas.put("shenzhen", "深圳市");
        guangdongAreas.put("zhuhai", "珠海市");
        guangdongAreas.put("shantou", "汕头市");
        guangdongAreas.put("foshan", "佛山市");
        guangdongAreas.put("shaoguan", "韶关市");
        guangdongAreas.put("zhanjiang", "湛江市");
        guangdongAreas.put("zhaoqing", "肇庆市");
        guangdongAreas.put("jiangmen", "江门市");
        guangdongAreas.put("maoming", "茂名市");
        guangdongAreas.put("huizhou", "惠州市");
        guangdongAreas.put("meizhou", "梅州市");
        guangdongAreas.put("shanwei", "汕尾市");
        guangdongAreas.put("heyuan", "河源市");
        guangdongAreas.put("yangjiang", "阳江市");
        guangdongAreas.put("qingyuan", "清远市");
        guangdongAreas.put("dongguan", "东莞市");
        guangdongAreas.put("zhongshan", "中山市");
        guangdongAreas.put("chaozhou", "潮州市");
        guangdongAreas.put("jieyang", "揭阳市");
        guangdongAreas.put("yunfu", "云浮市");
        cityAreaMap.put("guangdong", guangdongAreas);

        // 海南省
        Map<String, String> hainanAreas = new HashMap<>();
        hainanAreas.put("haikou", "海口市");
        hainanAreas.put("sanya", "三亚市");
        hainanAreas.put("danzhou", "儋州市");
        hainanAreas.put("sansha", "三沙市");
        hainanAreas.put("wuzhishan", "五指山市");
        hainanAreas.put("qionghai", "琼海市");
        hainanAreas.put("wenchang", "文昌市");
        hainanAreas.put("wnanning", "万宁市");
        hainanAreas.put("dongfang", "东方市");
        hainanAreas.put("dingan", "定安县");
        hainanAreas.put("tunchang", "屯昌县");
        hainanAreas.put("chengmai", "澄迈县");
        hainanAreas.put("lingao", "临高县");
        hainanAreas.put("qiongzhong", "琼中黎族苗族自治县");
        hainanAreas.put("baoting", "保亭黎族苗族自治县");
        hainanAreas.put("baisha", "白沙黎族自治县");
        hainanAreas.put("changjiang", "昌江黎族自治县");
        hainanAreas.put("lingshui", "陵水黎族自治县");
        hainanAreas.put("ledong", "乐东黎族自治县");
        cityAreaMap.put("hainan", hainanAreas);

        // 四川省
        Map<String, String> sichuanAreas = new HashMap<>();
        sichuanAreas.put("chengdu", "成都市");
        sichuanAreas.put("zigong", "自贡市");
        sichuanAreas.put("panzhihua", "攀枝花市");
        sichuanAreas.put("luzhou", "泸州市");
        sichuanAreas.put("deyang", "德阳市");
        sichuanAreas.put("mianyang", "绵阳市");
        sichuanAreas.put("guangyuan", "广元市");
        sichuanAreas.put("suining", "遂宁市");
        sichuanAreas.put("neijiang", "内江市");
        sichuanAreas.put("leshan", "乐山市");
        sichuanAreas.put("nanchong", "南充市");
        sichuanAreas.put("meishan", "眉山市");
        sichuanAreas.put("yibin", "宜宾市");
        sichuanAreas.put("guangan", "广安市");
        sichuanAreas.put("dazhou", "达州市");
        sichuanAreas.put("yaan", "雅安市");
        sichuanAreas.put("bazhong", "巴中市");
        sichuanAreas.put("ziyang", "资阳市");
        sichuanAreas.put("aba", "阿坝藏族羌族自治州");
        sichuanAreas.put("ganzi", "甘孜藏族自治州");
        sichuanAreas.put("liangshan", "凉山彝族自治州");
        cityAreaMap.put("sichuan", sichuanAreas);

        // 贵州省
        Map<String, String> guizhouAreas = new HashMap<>();
        guizhouAreas.put("guiyang", "贵阳市");
        guizhouAreas.put("liupanshui", "六盘水市");
        guizhouAreas.put("zunyi", "遵义市");
        guizhouAreas.put("anshun", "安顺市");
        guizhouAreas.put("bijie", "毕节市");
        guizhouAreas.put("tongren", "铜仁市");
        guizhouAreas.put("qianxinan", "黔西南布依族苗族自治州");
        guizhouAreas.put("qiandongnan", "黔东南苗族侗族自治州");
        guizhouAreas.put("qiannan", "黔南布依族苗族自治州");
        cityAreaMap.put("guizhou", guizhouAreas);

        // 云南省
        Map<String, String> yunnanAreas = new HashMap<>();
        yunnanAreas.put("kunming", "昆明市");
        yunnanAreas.put("qujing", "曲靖市");
        yunnanAreas.put("yuxi", "玉溪市");
        yunnanAreas.put("baoshan", "保山市");
        yunnanAreas.put("zhaotong", "昭通市");
        yunnanAreas.put("lijiang", "丽江市");
        yunnanAreas.put("puer", "普洱市");
        yunnanAreas.put("lincang", "临沧市");
        yunnanAreas.put("chuxiong", "楚雄彝族自治州");
        yunnanAreas.put("honghe", "红河哈尼族彝族自治州");
        yunnanAreas.put("wenshan", "文山壮族苗族自治州");
        yunnanAreas.put("xishuangbanna", "西双版纳傣族自治州");
        yunnanAreas.put("dehong", "德宏傣族景颇族自治州");
        yunnanAreas.put("nujiang", "怒江傈僳族自治州");
        yunnanAreas.put("diqing", "迪庆藏族自治州");
        yunnanAreas.put("dali", "大理白族自治州");
        cityAreaMap.put("yunnan", yunnanAreas);

        // 陕西省
        Map<String, String> shaanxiAreas = new HashMap<>();
        shaanxiAreas.put("xian", "西安市");
        shaanxiAreas.put("baoji", "宝鸡市");
        shaanxiAreas.put("xianyang", "咸阳市");
        shaanxiAreas.put("weinan", "渭南市");
        shaanxiAreas.put("hanzhong", "汉中市");
        shaanxiAreas.put("ankang", "安康市");
        shaanxiAreas.put("shangluo", "商洛市");
        shaanxiAreas.put("yulin", "榆林市");
        shaanxiAreas.put("yanan", "延安市");
        shaanxiAreas.put("tongchuan", "铜川市");
        cityAreaMap.put("shaanxi", shaanxiAreas);

        // 甘肃省
        Map<String, String> gansuAreas = new HashMap<>();
        gansuAreas.put("lanzhou", "兰州市");
        gansuAreas.put("jiayuguan", "嘉峪关市");
        gansuAreas.put("jinchang", "金昌市");
        gansuAreas.put("baiyin", "白银市");
        gansuAreas.put("tianshui", "天水市");
        gansuAreas.put("wuwei", "武威市");
        gansuAreas.put("zhangye", "张掖市");
        gansuAreas.put("pingliang", "平凉市");
        gansuAreas.put("jiuquan", "酒泉市");
        gansuAreas.put("qingyang", "庆阳市");
        gansuAreas.put("dingxi", "定西市");
        gansuAreas.put("longnan", "陇南市");
        gansuAreas.put("linxia", "临夏回族自治州");
        gansuAreas.put("gannan", "甘南藏族自治州");
        cityAreaMap.put("gansu", gansuAreas);

        // 青海省
        Map<String, String> qinghaiAreas = new HashMap<>();
        qinghaiAreas.put("xining", "西宁市");
        qinghaiAreas.put("haidong", "海东市");
        qinghaiAreas.put("haibei", "海北藏族自治州");
        qinghaiAreas.put("huangnan", "黄南藏族自治州");
        qinghaiAreas.put("hainan", "海南藏族自治州");
        qinghaiAreas.put("guoluo", "果洛藏族自治州");
        qinghaiAreas.put("yushu", "玉树藏族自治州");
        qinghaiAreas.put("haixi", "海西蒙古族藏族自治州");
        cityAreaMap.put("qinghai", qinghaiAreas);

        // 台湾省
        Map<String, String> taiwanAreas = new HashMap<>();
        taiwanAreas.put("taibei", "台北市");
        taiwanAreas.put("xinbei", "新北市");
        taiwanAreas.put("taoyuan", "桃园市");
        taiwanAreas.put("taizhong", "台中市");
        taiwanAreas.put("tainan", "台南市");
        taiwanAreas.put("gaosheng", "高雄市");
        taiwanAreas.put("jilong", "基隆市");
        taiwanAreas.put("xinchu", "新竹市");
        taiwanAreas.put("jiayi", "嘉义市");
        taiwanAreas.put("xinchuxian", "新竹县");
        taiwanAreas.put("miaoli", "苗栗县");
        taiwanAreas.put("zhanghua", "彰化县");
        taiwanAreas.put("nantou", "南投县");
        taiwanAreas.put("yunlin", "云林县");
        taiwanAreas.put("jiayixian", "嘉义县");
        taiwanAreas.put("pingdong", "屏东县");
        taiwanAreas.put("yilan", "宜兰县");
        taiwanAreas.put("hualien", "花莲县");
        taiwanAreas.put("taitung", "台东县");
        taiwanAreas.put("penghu", "澎湖县");
        cityAreaMap.put("taiwan", taiwanAreas);

        // 内蒙古自治区
        Map<String, String> neimengguAreas = new HashMap<>();
        neimengguAreas.put("huhehaote", "呼和浩特市");
        neimengguAreas.put("baotou", "包头市");
        neimengguAreas.put("wuhai", "乌海市");
        neimengguAreas.put("chifeng", "赤峰市");
        neimengguAreas.put("tongliao", "通辽市");
        neimengguAreas.put("eerduosi", "鄂尔多斯市");
        neimengguAreas.put("hulunbeier", "呼伦贝尔市");
        neimengguAreas.put("bayannaoer", "巴彦淖尔市");
        neimengguAreas.put("wulanchabu", "乌兰察布市");
        neimengguAreas.put("xinganmeng", "兴安盟");
        neimengguAreas.put("alashanmeng", "阿拉善盟");
        neimengguAreas.put("xilinguolemeng", "锡林郭勒盟");
        cityAreaMap.put("neimenggu", neimengguAreas);

        // 广西壮族自治区
        Map<String, String> guangxiAreas = new HashMap<>();
        guangxiAreas.put("nanning", "南宁市");
        guangxiAreas.put("liuzhou", "柳州市");
        guangxiAreas.put("guilin", "桂林市");
        guangxiAreas.put("wuzhou", "梧州市");
        guangxiAreas.put("beihai", "北海市");
        guangxiAreas.put("chongzuo", "崇左市");
        guangxiAreas.put("laibin", "来宾市");
        guangxiAreas.put("hezhou", "贺州市");
        guangxiAreas.put("yulin", "玉林市");
        guangxiAreas.put("baise", "百色市");
        guangxiAreas.put("hechi", "河池市");
        guangxiAreas.put("qinzhou", "钦州市");
        guangxiAreas.put("fangchenggang", "防城港市");
        guangxiAreas.put("guigang", "贵港市");
        cityAreaMap.put("guangxi", guangxiAreas);

        // 西藏自治区
        Map<String, String> xizangAreas = new HashMap<>();
        xizangAreas.put("lasa", "拉萨市");
        xizangAreas.put("rikaze", "日喀则市");
        xizangAreas.put("shannan", "山南市");
        xizangAreas.put("linzhi", "林芝市");
        xizangAreas.put("changdu", "昌都市");
        xizangAreas.put("naqu", "那曲市");
        xizangAreas.put("ali", "阿里地区");
        cityAreaMap.put("xizang", xizangAreas);

        // 宁夏回族自治区
        Map<String, String> ningxiaAreas = new HashMap<>();
        ningxiaAreas.put("yinchuan", "银川市");
        ningxiaAreas.put("shizuishan", "石嘴山市");
        ningxiaAreas.put("wuzhong", "吴忠市");
        ningxiaAreas.put("guyuan", "固原市");
        ningxiaAreas.put("zhongwei", "中卫市");
        cityAreaMap.put("ningxia", ningxiaAreas);

        // 新疆维吾尔自治区
        Map<String, String> xinjiangAreas = new HashMap<>();
        xinjiangAreas.put("wulumuqi", "乌鲁木齐市");
        xinjiangAreas.put("kelamayi", "克拉玛依市");
        xinjiangAreas.put("tulufan", "吐鲁番市");
        xinjiangAreas.put("hami", "哈密市");
        xinjiangAreas.put("hetian", "和田地区");
        xinjiangAreas.put("akesu", "阿克苏地区");
        xinjiangAreas.put("kashi", "喀什地区");
        xinjiangAreas.put("tacheng", "塔城地区");
        xinjiangAreas.put("aletai", "阿勒泰地区");
        xinjiangAreas.put("kezilesu", "克孜勒苏柯尔克孜自治州");
        xinjiangAreas.put("bayinguoleng", "巴音郭楞蒙古自治州");
        xinjiangAreas.put("changji", "昌吉回族自治州");
        xinjiangAreas.put("boertala", "博尔塔拉蒙古自治州");
        xinjiangAreas.put("yili", "伊犁哈萨克自治州");
        xinjiangAreas.put("kuitun", "奎屯市");
        xinjiangAreas.put("shihezi", "石河子市");
        xinjiangAreas.put("alier", "阿拉尔市");
        xinjiangAreas.put("tumushuke", "图木舒克市");
        xinjiangAreas.put("wujaquan", "五家渠市");
        cityAreaMap.put("xinjiang", xinjiangAreas);

        // 澳门特别行政区
        Map<String, String> aomenAreas = new HashMap<>();
        aomenAreas.put("aomenbandao", "澳门半岛");
        aomenAreas.put("aomenwaidao", "澳门外岛");
        cityAreaMap.put("aomen", aomenAreas);
    }

    /**
     * 根据城市拼音和区域拼音获取对应的中文名称
     */
    public static String getAreaNameByPinyin(String city, String pinyin) {
        Map<String, String> areaMap = cityAreaMap.get(city);
        return areaMap != null ? areaMap.get(pinyin) : null;
    }

    /**
     * 根据城市中文和区域中文获取对应的拼音
     */
    public static String getAreaPinyinByName(String city, String name) {
        Map<String, String> areaMap = cityAreaMap.get(city);
        if (areaMap == null) {
            return null;
        }
        for (Map.Entry<String, String> entry : areaMap.entrySet()) {
            if (entry.getValue().equals(name)) {
                return entry.getKey();
            }
        }
        return null;
    }

    /**
     * 根据城市的中文和区域的中文获取省份的拼音
     */
    public static String getProvincePinyinByCityAndArea(String city, String area) {
        for (Map.Entry<String, Map<String, String>> provinceEntry : cityAreaMap.entrySet()) {
            Map<String, String> areaMap = provinceEntry.getValue();
            for (Map.Entry<String, String> areaEntry : areaMap.entrySet()) {
                if (areaEntry.getValue().equals(city) || areaEntry.getValue().equals(area)) {
                    return provinceEntry.getKey();
                }
            }
        }
        return null;
    }
}
